package com.inkrl.book.service;

import com.fasterxml.jackson.databind.ObjectMapper;

import com.inkrl.book.mapper.BookMapper;
import com.inkrl.book.service.BookService;
import com.jt.common.pojo.Book;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.data.redis.core.ValueOperations;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.concurrent.TimeUnit;

@Service
public class BookServiceImpl implements BookService {
    @Autowired(required = false)
    private BookMapper bookMapper;

    @Override
    public List<Book> queryBook() {
        return bookMapper.selectAllBooks();
    }

    @Override
    public Book queryOneByIsbn(String isbn) {
        Book book = bookMapper.selectBooksByIsbn(isbn);
        return book;
    }
}
